import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Icons from '@element-plus/icons-vue'
// import { toLine } from './utils'
import KUI from './components'
const app = createApp(App)

/* // 全局注册图标，牺牲一点性能
for (let i in Icons) {
  // 注册全局组件
  app.component(`el-icon-${toLine(i)}`, (Icons as any)[i])
} */

for (const [key, component] of Object.entries(Icons)) {
  app.component(key, component)
}
app.use(router).use(ElementPlus).use(KUI)
app.mount('#app')
